<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        const arr = ['lichee', 'grape', 'cherry','mango','banana','banana','mango']
        console.log(arr.indexOf("mango"));
        const ans = arr.filter((name,index)=>arr.indexOf(name)==index);
        console.log(ans);
    </script>
</head>
<body>
    
</body>
</html>